package com.weitu.workflow.definition.constant;

/***
 * 工作流常量定义
 * @author wangqingguo
 */
public class FlowDefConstants {
	public static final int INCREASE_X = 20;
	public static final int INCREASE_Y = 20;
	public static final String ERROR_CANNOT_NULL = "NAME　CANNOT BE　NULL";

	public static final int WIDTH_NO_ACITVITY = 30;
	public static final int HEIGHT_NO_ACITVITY = 30;

	/***
	 * 流程对象类型
	 */
	public static final int ELEMENT_TYPE_FLOWPROCESS = 0;
	public static final int ELEMENT_TYPE_STARTNODE = 1;
	public static final int ELEMENT_TYPE_ACTIVITY = 2;
	public static final int ELEMENT_TYPE_FORMTASK = 3;
	public static final int ELEMENT_TYPE_TOOLTASK = 4;
	public static final int ELEMENT_TYPE_TRANSITION = 5;
	public static final int ELEMENT_TYPE_SYNCHRONIZER = 6;
	public static final int ELEMENT_TYPE_ENDNODE = 7;

	/***
	 * 节点默认初始化名称
	 */
	public static final String INIT_STARTNODE_NAME = "START_NODE";
	public static final String INIT_ACTIVITY_NAME = "Activity";
	public static final String INIT_FORMTASK_NAME = "FormTask";
	public static final String INIT_TOOLTASK_NAME = "ToolTask";
	public static final String INIT_TRANSITION_NAME = "Transition";
	public static final String INIT_SYNCHRONIZER_NAME = "Synchronizer";
	public static final String INIT_ENDNODE_NAME = "END_NODE";

	/***
	 *
	 */
	public static final int FORM_EDIT = 1;// 编辑表单
	public static final int FORM_VIEW = 2;// 只读表单
	public static final int FORM_LIST = 3;// 列表表单


	/***
	 * 流程变量
	 */
	public static final String FLOW_FIRSTUSER_ID = "WORKFLOW_FIRSTUSER_ID";//业务id变量
	public static final String FLOW_BIZ_ID = "WORKFLOW_BIZ_ID";//业务id变量
	public static final String FLOW_FIRSTACTIVITY_ID = "WORKFLOW_FIRSTACTIVITY_ID";//业务id变量

	public static final String FLOWCOPY_SUFFIX = "__@@__";














	public static final String ERROR_NAME_DUPLICATE = "HAS ONE ELEMENT WITH THE SAME NAME OF THIS TYPE";
	public static final String ERROR_NAME_ISNULL = "NAME IS NULL";

	public static final String ERROR_OBJECT_NOTNULL = " CAN NOT NULL";
	public static final String ERROR_OBJECT_NOTFIND = " cannot search Object By Id";
	public static final String ERROR_MODIFY_FAIL = " MODIFY FAIL";
	public static final String ERROR_USER_NOTEXIST = "THERE IS NOT EXIST THIS　USER";
	public static final String ERROR_ROLE_NOTEXIST = "THERE IS NOT EXIST THIS　ROLE";
	public static final String ERROR_HANDLER_NOTEXIST = "THERE IS NOT EXIST HANDLER FOR MAP";
	public static final String ERROR_SUBFLOW_NOTEXIST = "THERE IS NOT EXIST SUBFLOW OWN THE SUBFLOWPROCESSID ";
	public static final String ERROR_LOCATION_FAIL = "ELEMENT'S LOCATION MODIFY FAILED";
	public static final String ERROR_INIT_FAIL = " INITIAL FAIL";
	public static final int WIDTH_ACITVITY = 45;
	public static final int HEIGHT_ACITVITY = 50;
	public static final int X_START = 20;
	public static final int Y_START = 20;
	public static final int X_END = 500;
	public static final int Y_END = 500;





	public static final String BRFLAG = "BR";
	public static final String RELATEDACTIVITY = "RELATEDACTIVITY";//关联的Activity（分支驳回）
	public static final String RELATEDSYNCHRONIZER = "RELATEDSYNCHRONIZER";//关联的同步器（分支驳回）
	
	public static final String BIZCURSOR = "BIZCURSOR";
	
	public static final String ACTIONSOFTASK = "ACTIONSOFTASK";
	// public static final String ACTION_START = "ACTION_START";
	// public static final String ACTION_DO = "ACTION_DO";
	// public static final String ACTION_REJECT = "ACTION_REJECT";
	// public static final String ACTION_JUMP = "ACTION_JUMP";
	// public static final String ACTION_STOP = "ACTION_STOP";
	// public static final String ACTION_SUSPEND = "ACTION_SUSPEND";
	// public static final String ACTION_CONSIGN = "ACTION_CONSIGN";
	// public static final String ACTION_RETRACT = "ACTION_RETRACT";
	// public static final String ACTION_SUBFLOW = "ACTION_SUBFLOW";
	public static final String ACTION_START_N = "开启";
	public static final String ACTION_DO_N = "处理";
	public static final String ACTION_CLAIM_N = "签收";
	public static final String ACTION_UNCLAIM_N = "拒签";
	public static final String ACTION_REJECT_N = "驳回";
	public static final String ACTION_JUMP_N = "跳转";
	public static final String ACTION_STOP_N = "结束";
	public static final String ACTION_SUSPEND_N = "挂起";
	public static final String ACTION_CONSIGN_N = "委托";
	public static final String ACTION_RETRACT_N = "收回";
	public static final String ACTION_SUBFLOW_N = "发起子流程";
	public static final String ACTION_HANDROUND_N = "传阅";

	public static final String PERFORMER_ACTOR = "actor?";
	public static final String FORMTASK_OPERATORS = "FORMTASK_OPERATORS";
	public static final String PERFORMER_ROLE = "role?";

	public static final String TASK_USERS = "TASK_USERS";
	public static final String TASK_CONDITIONS_KEY = "TASK_CONDITIONS_KEY";
	public static final String TASK_CONDITIONS_VALUE = "TASK_CONDITIONS_VALUE";




	public static final String ERROR_PREFIX = "Error:";
	public static final String RETURN_PREXML = ";preXML:";
	public static final String RETURN_SUCCESS = "success";
	public static final String WORKFLOWPROCESS_IDENTIFY = "_@@_WFP_@@_";


	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";
	// public static final String ERROR_NAME_DUPLICATE="";


	public static final String TASK_CONDITION_KEY = "TASK_CONDITION";
	public static final String[] TASK_CONDITION_VALUES = { "业务数据", "部门化分", "日期" };
	public static final String TASK_CONDITIONVALUE_KEY = "TASK_CONDITIONVALUE_KEY";
	public static final String VALIDATEPROCESS_VALIDATE = "VALIDATEPROCESS_VALIDATE";
	public static final String VALIDATEPROCESS_WORNNING = "VALIDATEPROCESS_WORNNING";
	public static final String VALIDATEPROCESS_ERROR = "VALIDATEPROCESS_ERROR";

	public static final String TREE_PROP_TID = "\"TREE_PROP_TID\"";
	public static final String TREE_PROP_DISPLAYNAME = "\"TREE_PROP_DISPLAYNAME\"";
	public static final String TREE_PROP_TTYPE = "\"TREE_PROP_TTYPE\"";
	public static final String TREE_PROP_TNAME = "\"TREE_PROP_TNAME\"";
	public static final String TREE_PROP_TLEVEL = "\"TREE_PROP_TLEVEL\"";
	public static final String TREE_PROP_PARENTID = "\"TREE_PROP_PARENTID\"";
	public static final String TREE_PROP_TPOSTNAME = "\"TREE_PROP_TPOSTNAME\"";
	public static final String TREE_PROP_TJOBNUM = "\"TREE_PROP_TJOBNUM\"";
	public static final String TREE_PROP_TLIMITID = "\"TREE_PROP_TLIMITID\"";
	public static final String TREE_PROP_TLIMITNAME = "\"TREE_PROP_TLIMITNAME\"";
	
	public static final String TREE_POST_ID = "\"TREE_POST_ID\"";
	public static final String TREE_POST_NAME = "\"TREE_POST_NAME\"";
	public static final String TREE_POST_DEPTID = "\"TREE_POST_DEPTID\"";
	public static final String TREE_POST_DEPTNAME = "\"TREE_POST_DEPTNAME\"";
	public static final String TREE_POST_COMPANY = "\"TREE_POST_COMPANY\"";

	public static final String TREE_PROP_TTYPE_U = "人员";
	public static final String TREE_PROP_TTYPE_D = "部门";
	public static final String TREE_PROP_TTYPE_P = "职位";
	/**
	 * 部门节点模板--tid displayname ttype tname tlevel parentid tpostname tjobnum
	 */
	public static final String TREE_DEPT = "<department isBranch=\"true\" isLeave=\"false\"" + " tid=\"" + TREE_PROP_TID + "\" displayname=\"" + TREE_PROP_DISPLAYNAME + "\" ttype=\"" + TREE_PROP_TTYPE_D + "\" tname=\"" + TREE_PROP_TNAME + "\" tlevel=\"" + TREE_PROP_TLEVEL + "\" parentid=\"" + TREE_PROP_PARENTID + "\" tpostname=\"" + TREE_PROP_TPOSTNAME + "\" tjobnum=\"" + TREE_PROP_TJOBNUM + "\"/>";
	/**
	 * 用户节点模板
	 */
	public static final String TREE_USER = "<participator tid=\"" + TREE_PROP_TID + "\" displayname=\"" + TREE_PROP_DISPLAYNAME + "\" ttype=\"" + TREE_PROP_TTYPE_U + "\" tname=\"" + TREE_PROP_TNAME + "\" tlevel=\"" + TREE_PROP_TLEVEL + "\" parentid=\"" + TREE_PROP_PARENTID + "\" tpostname=\"" + TREE_PROP_TPOSTNAME + "\" tjobnum=\"" + TREE_PROP_TJOBNUM + "\" tlimitid=\"" + TREE_PROP_TLIMITID + "\" tlimitname=\"" + TREE_PROP_TLIMITNAME + "\"/>";
	/**
	 * 组织节点模板
	 */
	public static final String TREE_ORGAN = "<organization" + " tid=\"" + TREE_PROP_TID + "\" deptname=\"" + TREE_PROP_DISPLAYNAME + "\" parentid=\"" + TREE_PROP_PARENTID + "\"/>";
	/**
	 * （职位/人员）节点模板
	 */
	//tid:职位id displayname：职位名称 ttype：“职位”  tname：子公司名称  parentid：部门id tpostname：部门名称
	public static final String TREE_POST = "<post tid=\"" + TREE_PROP_TID + "\" displayname=\"" + TREE_PROP_DISPLAYNAME + "\" ttype=\"" + TREE_PROP_TTYPE_P + "\" tname=\"" + TREE_PROP_TNAME + "\" tlevel=\"" + TREE_PROP_TLEVEL + "\" parentid=\"" + TREE_PROP_PARENTID + "\" tpostname=\"" + TREE_PROP_TPOSTNAME + "\" tjobnum=\"" + TREE_PROP_TJOBNUM + "\"/>";
	public static final String TREE_LEAF = "<participator tid=\"" + TREE_PROP_TID + "\" displayname=\"" + TREE_PROP_DISPLAYNAME + "\" ttype=\"" + TREE_PROP_TTYPE_U + "\" tname=\"" + TREE_PROP_TNAME + "\" tlevel=\"" + TREE_PROP_TLEVEL + "\" parentid=\"" + TREE_PROP_PARENTID + "\" tpostname=\"" + TREE_PROP_TPOSTNAME + "\" tjobnum=\"" + TREE_PROP_TJOBNUM + "\"/>";
	
	
	public static final String WORKFLOWDEF_PROCESSID = "WORKFLOWDEF_PROCESSID";
	public static final String WORKFLOWDEF_DISPLAYNAME = "WORKFLOWDEF_DISPLAYNAME";
	public static final String WORKFLOWDEF_DESCRIPTION = "WORKFLOWDEF_DESCRIPTION";
	/**
	 * 工作流定义模板
	 */
	public static final String WORKFLOWDEF_TEMPLATE = "<workflow id=\"" + WORKFLOWDEF_PROCESSID + "\" displayname=\"" + WORKFLOWDEF_DISPLAYNAME + "\" description=\"" + WORKFLOWDEF_DESCRIPTION + "\"/>";
	public static final String FORMTASK_DEFAULT_HANDLER = "formTaskDefaultHandler";
	public static final String FORMTASK_DEFAULT_FIRSTHANDLER = "firstFormTaskDefaultHandler";
	public static final String FORMTASK_DEFAULT_NAME = "NAME";
	public static final String FORMTASK_DEFAULT_DISPLANNAME = "DISPLANNAME";
	public static final String FORMTASK_DEFAULT_DESCRIPTION = "DESCRIPTION";
	
	public static final String TOOLTASK_DEFAULT_LISTENER = "toolTaskEventListener";
	public static final String FORMTASK_DEFAULT_LISTENER = "formTaskEventListener";

	public static final String DATAFIELD_JAVABEAN_PREFIX = "D_J_P";

	public static final String TABLE_BEAN_NAME = "TABLE_BEAN_NAME1";
	public static final String TABLE_BEAN_CLASS = "TABLE_BEAN_CLASS";
	public static final String TABLE_COLUMN_NAME = "TABLE_COLUMN_NAME";
	public static final String TABLE_COLUMN_TYPE = "TABLE_COLUMN_TYPE";

	public static final String DATAFIELD_ID = "DATAFIELD_ID";
	public static final String DATAFIELD_NAME = "DATAFIELD_NAME";
	public static final String DATAFIELD_DISPLAYNAME = "DATAFIELD_DISPLAYNAME";

	/**
	 * 表模板
	 */
	public static final String TABLE_BEAN_TEMPLATE = "<table name=\"" + TABLE_BEAN_NAME + "\" beanClass=\"" + TABLE_BEAN_CLASS + "\"/>";
	/**
	 * 字段模板
	 */
	public static final String TABLE_COLUMN_TEMPLATE = "<field fieldName=\"" + TABLE_COLUMN_NAME + "\" dataType=\"" + TABLE_COLUMN_TYPE + "\"/>";
	public static final String TABLES_COLUMN_TEMPLATE = "<field beanClass=\"" + TABLE_BEAN_CLASS + "\" fieldName=\"" + TABLE_COLUMN_NAME + "\" dataType=\"" + TABLE_COLUMN_TYPE + "\"/>";
	public static final String DATAFIELD = "<field id=\"" + DATAFIELD_ID + "\" fieldName=\"" + DATAFIELD_NAME + "\" DisplayName=\"" + DATAFIELD_DISPLAYNAME + "\"/>";

	// Task通过比例
	public static final String PASSRATION = "PASSRATION";
	public static final String VOTE = "VOTE";
	
	//业务标识扩展属性
	public static final String BUSINESSIDENTIFY = "BUSINESSIDENTIFY";
	public static final String SHOWCREATE="SHOWCREATE";
	//环节处理人类型
	public static final String ASSIGNEDTOTYPE = "ASSIGNEDTOTYPE";
	/**
	 * 规则选择的相关常量
	 * **/
	public static final String RULE = "RULE";
	public static final String IFPRIORITY = "IFPRIORITY";
	public static final String PRIORITY = "PRIORITY";
	/**
	 * 驳回时跳转到的activityid
	 */
	public static final String BACKACTIVITYWHENREJECT = "BACKACTIVITYWHENREJECT";

	/**
	 * 运行时跳转到的activityid
	 */
	public static final String JUMPACTIVITYWHENRUN = "JUMPACTIVITYWHENRUN";
	/**
	 * 第一次运行流程实例
	 */
	public static final String FIRSTTIMEOFPROCESSINSTANCE = "FIRSTTIMEOFPROCESSINSTANCE";
	//工作流所属类型
	public static final String WORKFLOWTYPE = "WORKFLOWTYPE";
	public static final String COMPANYSOFWORKFLOW = "COMPANYSOFWORKFLOW";

	public static final String WORKFLOWTYPE_COMMON = "集团和所有公司";
	public static final String WORKFLOWTYPE_CHARACTER = "个别公司";
	
	//任务意见项配置
	public static final String ISOPINION = "ISOPINION";
	public static final String OPINIONARGS = "OPINIONARGS";
	// //一级规则
	// public static final String SAMEDEPT = "0"; //同部门
	// public static final String SAMEFILIALE = "1";//同分公司
	// public static final String SAMESUPERIOR = "2";//同上级单位
	// //二级规则
	// public static final String POSITION = "0";//岗位
	// public static final String PERSON = "1"; //人员
	//人工环节是否有效
	public static final String ISVALID = "ISVALID";
	/**
	 * 流程监控人公司标识*/
	public static final String FLOW_MONITOR_GLOBAL="global";
}
